<!doctype html>
<html>

	<head id="top">
		<meta charset="UTF-8">
		<title>{{title}}</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/common.css" />
		<link rel="stylesheet" href="css/thyroidTest.css" />
		<link rel="stylesheet" href="css/iconfont.css" />
	</head>
	<body>
		<!--列表项-->
		<section>
			<div id="box">
				<ul class="itemBox"> 
			        <li v-for="msg in message" @click="jumpTestDetail(msg.id,msg.productName)">
		            	<span class="listIcon">
		            		<i class="icon iconfont icon-tubiaozhizuomoban3"></i>
		            	</span>
			            <a>
			            	<span class="listDetail">{{msg.productName}}</span>
			            </a>
			        </li>
				</ul>
			</div>
		</section>
		
		
		<script src="js/mui.min.js"></script>
		<script src="js/vue.js"></script>
		<script src="js/cmms.js" ></script>
		<script type="text/javascript">
			mui.init()
		</script>
		<script type="text/javascript">
			var top=new Vue({
				el:'#top',
				data:{
					title:''
				},
				mounted(){
					let url=location.href.split("?")[1];
					this.get(url);
				},
				methods:{
					get:function(url){
						let _this=this;
						if(url){
							let code=url.split("&")[1].split("=")[1];
							let t = decodeURI(decodeURI(code)); 
							_this.title=t;
					}
				}
				}
			});
			var box=new Vue({
				el:'#box',
				data:{
//					url:'https://lab.ulabcare.com/clinicalmall-web/',
					message:{},
					id:''
				},
				mounted(){
					url=location.href.split('?')[1];
					this.getCode(url);
					this.loadMessage(this.url);
				},
				methods:{
					getCode:function(url){
						let _this=this;
						let code=url.split('&')[0].split('=')[1];
						_this.id=code;
						
					},
					loadMessage:function(url){
						let _this=this;
						mui.ajax(YN.baseUrl+'jyzsApp/selectProjectIntroductions',{
							data:{
								relationshipId:_this.id,
								pageSize:1000
							},
							headers:{'Content-Type': 'application/json'}, 
							dataType:'json',//服务器返回json格式数据
							type:'post',//HTTP请求类型
							success:function(res){
								//服务器返回响应，根据响应结果，分析；
								 console.log(res.data);
								if(res.code=="000000"){
									_this.message=res.data;
								}
							},
							error:function(xhr,type,errorThrown){
								//异常处理；
								console.log(type);
							}
						});
					},
					//跳转到测试明细
					jumpTestDetail:function(id,title){
						let t= encodeURI(encodeURI(title));
						location.href="testDetail.html?id="+id+"&title="+t;
					}
					
				}
			});
		</script>
	</body>

</html>